背景
FLUX.1 Kontext 是由 Black Forest Labs(黑森林实验室)开发的一款先进的 多模态图像生成与编辑模型,属于 FLUX-1 模型系列的最新成员,主打 上下文感知生成与编辑能力,能够高效处理文本到图像生成(Text-to-Image)和图像引导编辑(Image-to-Image)任务。
镜像安装
Replicate 官方有人上传了一个镜像
https://replicate.com/prunaai/flux-kontext-dev?input=docker
安装
docker run \
	--name=flux-kontext-dev \
	-d -p 5000:5000 \
	--gpus=all \
	r8.im/prunaai/flux-kontext-dev@sha256:9186720586f2b98dc043280ad11e590eae7788c013d7db977ffe9192e5ae7ef4
测试服务
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d $'{
    "input": {
      "seed": 1,
      "prompt": "Replace “schnell” by “Kontext” and make the prune blue",
      "guidance": 2.5,
      "speed_mode": "Real Time",
      "aspect_ratio": "match_input_image",
      "img_cond_path": "https://replicate.delivery/pbxt/NFoiYQ8DdIEQFepICB7SpZB6mI2HC4xZjiHl9mXFqMhZS9sY/flux_schnell.png",
      "output_format": "jpg",
      "output_quality": 80,
      "num_inference_steps": 30
    }
  }' \
  http://localhost:5000/predictions
方案2
https://github.com/cdvelop/comfyui-docker

export DOCKER_MODELS=/data/projects/ComfyUI/models/
export DOCKER_VOLUMES=/data/projects/ComfyUI/custom_nodes/
docker run \
    --name comfyui \
    --detach \
    --restart unless-stopped \
    --env USER_ID="$(id -u)" \
    --env GROUP_ID="$(id -g)" \
    --volume "./comfyui_volume/comfyui_models:/opt/comfyui/models:rw" \
    --volume "./comfyui_volume/comfyui_volumes:/opt/comfyui/custom_nodes:rw" \
    --publish 8188:8188 \
    --runtime nvidia \
    --gpus all \
    ghcr.io/lecode-official/comfyui-docker:latest
方案 3
https://github.com/city96/ComfyUI-GGUF